package com.pureut.production.controller;

import com.pureut.common.core.web.controller.BaseController;
import com.pureut.common.core.web.domain.AjaxResult;
import com.pureut.common.core.web.page.TableDataInfo;
import com.pureut.production.domain.dto.ClothInspectionDetailDto;
import com.pureut.production.domain.dto.ClothInspectionDto;
import com.pureut.production.domain.vo.ClothInspectionVo;
import com.pureut.production.service.ClothInspectionDetailService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/***
 * 验布明细控制层
 * Author:C
 * Date:2023/02/20 10:58
 * @DESC
 */
@RestController
@RequestMapping("/cloth-inspection-detail")
public class ClothInspectionDetailController extends BaseController {

    @Resource
    ClothInspectionDetailService clothInspectionDetailService;

    /**
     * 验布明细列表
     */
    @GetMapping("/list")
    public TableDataInfo selectOperationList(String masterVolumeNumber) {
        startPage();
        // 查询验布明细列表
        List<ClothInspectionDetailDto> list = clothInspectionDetailService.getList(masterVolumeNumber);
        return getDataTable(list);
    }

    /**
     * 验布明细列表 远程调用 产品追溯
     *
     * @param masterVolumeNumber
     * @return
     */
    @GetMapping("/selectDetailLisMasterVolumeNumber")
    public AjaxResult selectDetailLisMasterVolumeNumber(String masterVolumeNumber) {
        return AjaxResult.success(clothInspectionDetailService.selectDetailLisMasterVolumeNumber(masterVolumeNumber));
    }
}
